package com.demo2do.fms.admin.service.supplier;

import java.util.List;

import com.demo2do.core.entity.page.Page;
import com.demo2do.fms.admin.entity.search.supplier.TeamSearch;
import com.demo2do.fms.admin.entity.security.Login;
import com.demo2do.fms.entity.driver.Team;

/**
 * 
 * @author Wy
 *
 */
public interface TeamService {
    
    /**
     * @param login
     * @return
     */
    public int count(Login login);
    
    /**
     * 
     * @param search
     * @param login
     * @return
     */
    public int count(TeamSearch search, Login login);
    
    /**
     * 
     * @param login
     * @param page
     * @return
     */
    public int countSub(Login login, Page page);
    
    /**
     * @param search
     * @param login
     * @return
     */
    public int countSub(TeamSearch search, Login login);
    
    /**
     * @param login
     * @param page
     * @return
     */
    public List<Team> list(Login login, Page page);
    
    /**
     * 
     * @param login
     * @param page
     * @return
     */
    public List<Team> listSub(Login login, Page page);
    
    /**
     * 
     * @param search
     * @param login
     * @param page
     * @return
     */
    public List<Team> search(TeamSearch search, Login login, Page page);
    
    /**
     * @param search
     * @param login
     * @param page
     * @return
     */
    public List<Team> searchSub(TeamSearch search, Login login, Page page);
    
    /**
     * @param id
     * @return
     */
    public Team load(Long id);
    
    /**
     * @param code
     * @return
     */
    public boolean exist(String code);
    
    /**
     * 
     * @param team
     * @param login
     */
    public void create(Team team, Login login);
    
    /**
     * 
     * @param team
     * @param operator
     */
    public void edit(Team team, Long operator);

    /**
     * @param id
     * @param operator
     */
    public void disable(Long id, Long operator);

}
